<template>
  <div class="q-pa-md">
    <div class="q-gutter-md" style="max-width: 300px">
      <t-file filled v-model="model" label="Label (stacked)" stack-label />

      <t-file outlined v-model="model">
        <template v-slot:prepend>
          <t-icon name="attach_file" />
        </template>
      </t-file>

      <t-file standout v-model="model">
        <template v-slot:append>
          <t-avatar>
            <img src="https://cdn.quasar.dev/logo-v2/svg/logo.svg" />
          </t-avatar>
        </template>
      </t-file>

      <t-file filled bottom-slots v-model="model" label="Label" counter>
        <template v-slot:prepend>
          <t-icon name="cloud_upload" @click.stop.prevent />
        </template>
        <template v-slot:append>
          <t-icon
            name="close"
            @click.stop.prevent="model = null"
            class="cursor-pointer"
          />
        </template>

        <template v-slot:hint> Field hint </template>
      </t-file>

      <t-file
        rounded
        outlined
        bottom-slots
        v-model="model"
        label="Label"
        counter
        max-files="12"
      >
        <template v-slot:before>
          <t-icon name="attachment" />
        </template>

        <template v-slot:append>
          <t-icon
            v-if="model !== null"
            name="close"
            @click.stop.prevent="model = null"
            class="cursor-pointer"
          />
          <t-icon name="search" @click.stop.prevent />
        </template>

        <template v-slot:hint> Field hint </template>
      </t-file>

      <t-file
        filled
        bottom-slots
        v-model="model"
        label="Label"
        counter
        max-files="12"
      >
        <template v-slot:before>
          <t-avatar>
            <img src="https://cdn.quasar.dev/img/avatar5.jpg" />
          </t-avatar>
        </template>

        <template v-slot:append>
          <t-icon
            v-if="model !== null"
            name="close"
            @click.stop.prevent="model = null"
            class="cursor-pointer"
          />
          <t-icon name="create_new_folder" @click.stop.prevent />
        </template>

        <template v-slot:hint> Field hint </template>

        <template v-slot:after>
          <t-btn round dense flat icon="send" />
        </template>
      </t-file>

      <t-file
        filled
        bottom-slots
        v-model="model"
        label="Label"
        counter
        max-files="12"
      >
        <template v-slot:before>
          <t-icon name="folder_open" />
        </template>

        <template v-slot:hint> Field hint </template>

        <template v-slot:append>
          <t-btn round dense flat icon="add" @click.stop.prevent />
        </template>
      </t-file>
    </div>
  </div>
</template>

<script>
  import { ref } from 'vue';

  export default {
    setup() {
      return {
        model: ref(null),
      };
    },
  };
</script>
